package down;

public class ManKind {



        // 成员变量
        int sex;
        int salary;

        // 方法manOrWoman
        void manOrWoman() {
            if (sex == 1) {
                System.out.println("man");
            } else if (sex == 0) {
                System.out.println("woman");
            } else {
                System.out.println("Unknown");
            }
        }

        // 方法employeed
        void employeed() {
            if (salary == 0) {
                System.out.println("no job");
            } else {
                System.out.println("job");
            }
        }
    }

    // 定义Kids类继承ManKind
    class Kids extends ManKind {
        // 成员变量
        int yearsOld;

        // 方法printAge
        void printAge() {
            System.out.println("Age: " + yearsOld);
        }
    }





